package com.changpeng.shake.controller;

import com.changpeng.shake.annotation.NoRepeatSubmit;
import com.changpeng.shake.annotation.RequestKeyParam;
import com.changpeng.shake.common.Result;
import com.changpeng.shake.entity.AddReq;
import lombok.extern.java.Log;
import org.springframework.web.bind.annotation.*;

@RequestMapping("user")
@RestController
public class UserController {


    @PostMapping("/add")
    @NoRepeatSubmit
    public Result<String> add(@RequestBody @RequestKeyParam AddReq addReq) {
        return Result.success("OK");
    }

    @GetMapping("/error")
    public String error(String msg) {
        int i = 1/0;
        return msg;
    }
}
